import {getAllCourse} from '@/api/course'

export default{
   state:{
       courseList:[]
   },
   mutations:{
       setCourseList(state,{arr}){
            state.courseList=arr;
       }
   },
   actions:{
      getCourseList({commit}){
          getAllCourse().then((arr)=>{
              commit("setCourseList",{arr});
          });
      }
   }
}